package com.sym.demo.pattern.startegy;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.poi.ss.formula.functions.T;

/**
 * 策略模式 的业务类 猫
 * @author suyongming
 * @date ：2021/3/7 16:27
 */
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Cat implements Comparable<Cat>{
    protected Integer width,hight;

    @Override
    public int compareTo(Cat o) {
        if(this.width > o.width) return 1;
        else if (this.width < o.width) return -1;
        return 0;
    }

}
